
package com.carsite.dao;

import java.util.List;

import com.carsite.dao.Dao;
import com.carsite.model.Product;

public interface ProductDao extends Dao {

    /**
     * Retrieves all of the products
     */
    public List getProducts(Product product);

    /**
     * Gets product's information based on primary key. An
     * ObjectRetrievalFailureException Runtime Exception is thrown if 
     * nothing is found.
     * 
     * @param id the product's id
     * @return product populated product object
     */
    public Product getProduct(final Integer id);

    /**
     * Saves a product's information
     * @param product the object to be saved
     */    
    public void saveProduct(Product product);

    /**
     * Removes a product from the database by id
     * @param id the product's id
     */
    public void removeProduct(final Integer id);
}

